package day12;

import java.util.Scanner;

/**
 * @author tongchen
 * @create 2023-03-19 14:39
 */
public class Main {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        int num=scanner.nextInt();
        int half1=num/2;
        int half2=num/2;
        while(true){
            if(isPrime(half1)&&isPrime(half2)){
                System.out.println(half2);
                System.out.println(half1);
                return;
            }
            half1++;
            half2--;
        }
    }
    //创建判断是否是素数的方法
    public static boolean isPrime(int num){
        for (int i=2;i<=Math.sqrt(num);++i){
            if(num%i==0){
                return  false;
            }
        }
        return true;
    }
}
